package io.renren.modules.workflow.enums;
/**
 * @Desc: 流程一些特殊业务枚举值
 * @auther: landlord
 * @date: 2021/8/2 12:03
 * @return:
 */
public enum ActBusSpecialBusinessEnum {
    END("end", "流程结束标识"),START("start", "流程开始标识"),
    APPROVAL("approval","同意"),REJECT("reject","驳回"),
    REJECTEDTYPEINITIATE("1","驳回发起者"),REJECTEDTYPEON("2","驳回上一审批环节"),
    REJECTEDSPECIFIEDNODE("4","驳回任意审批节点"),PROCESS_VARIABLE_OBJECT("process_variable_object","流程变量对象");
    // 成员变量
    private String key;
    private String value;
    // 构造方法
    private ActBusSpecialBusinessEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (ActBusSpecialBusinessEnum fs : ActBusSpecialBusinessEnum.values()) {
            if (fs.getKey().equalsIgnoreCase(key)) {
                return fs.value;
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
